import {
    TRUMPCOURSE
  } from './index';
  
//   import BSPError from './../common/bsperror';
  import HttpRequest from './../common/http';
  
  const rootUrl = window.restConfig.rootUrl;
  
  export const trumpCourseAction = (text) => {
    return (dispatch) => {
      HttpRequest.get(rootUrl + '/trumpCourse')
        .then((ret) => {
          dispatch({
            type: TRUMPCOURSE,
            data: text
          })
        }).catch((err) => {
          dispatch({
            type: TRUMPCOURSE,
            data: err.message
          })
        });
    }
  }